﻿using AIO.Entity.Base;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace AIO.Entity
{
    /// <summary>
    /// 宿舍
    /// </summary>
    [Table("BG01")]
    public class Hostel:BaseEntity
    {
        /// <summary>
        /// 栋
        /// </summary>
        [Required]
        [MaxLength(30)]
        [Column("BG001")]
        public string Building { get; set; }

        /// <summary>
        /// 楼层
        /// </summary>
        [Required]
        [MaxLength (2)]
        [Column("BG002")]
        public FloorEnum Floor { get; set; }

        /// <summary>
        /// 宿舍号
        /// </summary>
        [Required]
        [MaxLength(30)]
        [Column("BG003")]
        public string HostelNumber { get; set; }

        /// <summary>
        /// 入住人数:表示几人间
        /// </summary>
        [Required]
        [Column("BG004")]
        public int Occupancy { get; set; }

        /// <summary>
        /// 舍长
        /// </summary>
        [ForeignKey("A01")]
        [Column("BG005")]
        public Student Parents { get; set; }

        /// <summary>
        /// 男女生宿舍
        /// </summary>       
        [Column("BG006")]
        public GenderEnum HosteGender { get; set; }

    }
}
